home *** CD-ROM | disk | FTP | other *** search
/ Family Fun / Family Fun.iso / joke1 / ringmsg1 / ringmsgs.bas next >
BASIC Source File  |  1979-12-31  |  2KB  |  56 lines

  1.                                  DEFINT I-R
  2.                                  CLS
  3.                                  RESTORE
  4. 'RINGMSGS - QuickBASIC code for a joke program.
  5. 'The ringing portion is adapted from John Qualtrough's routine.
  6. 'Rest of the program is more or less in QB, by Art Pike, WWWC! BBS
  7. 'Las Cruces, NM 505-523-4528.  Open bd, 300-9600 USR.  All welcome!
  8.  
  9. Ring:
  10. CLS : LOCATE 2, 5: PRINT "AUTOMATIC PHONE ANSWERING SYSTEM "
  11. LOCATE 3, 10: PRINT "Type M to display message when phone rings, or"
  12. LOCATE 4, 10: PRINT "type a period to end."
  13. GOSUB Delay
  14. FOR k = 1 TO 30
  15.   SOUND 540, .3: SOUND 0, .2: SOUND 320, .3: SOUND 5000, .05: SOUND 0, .2
  16.   t$ = INKEY$
  17.   IF t$ = "." THEN CLOSE : END
  18.   IF t$ = "M" OR t$ = "m" THEN GOSUB Message: GOTO Ring
  19. NEXT k
  20. GOSUB Delay: GOTO Ring
  21.  
  22. Delay:
  23. 'Adjust until things sound right for your system
  24. FOR jk = 1 TO 32000: NEXT jk: FOR jk = 1 TO 32000: NEXT: RETURN
  25.  
  26. Message:
  27. CLS
  28.   LOCATE 4, 15: PRINT "Message For :"; : READ D$
  29.   IF D$ = "9999" THEN RESTORE: CLS : GOTO Ring ELSE PRINT D$
  30.   LOCATE 5, 15: PRINT "From        :"; : READ D$: PRINT D$
  31.   LOCATE 7, 15: PRINT "Message follows . . ."
  32.   LOCATE 9, 15: READ D$: PRINT D$
  33.   LOCATE 10, 15: READ D$: PRINT D$
  34.   LOCATE 24, 20: PRINT "Ank key to continue . . .";
  35.   tt$ = INPUT$(1)
  36. RETURN
  37.  
  38. 'Message data format is 1 data line containing TO and FROM separated
  39. 'by comma--then 2 lines for message.  Be sure not to use any commas
  40. 'in the message data statements.  After last, enter a DATA statement
  41. 'with 9999.
  42.  
  43. 'A message
  44. DATA Ann, Ed McMahon
  45. DATA If you Pike from Lost Causes NM then
  46. DATA please send me $10000000 asap.
  47.  
  48. 'Another message
  49. DATA All,Art Pike-Sysop
  50. DATA Call Waterfront West Wildcat! BBS in Las Cruces NM
  51. DATA full privileges first call-505-423-4528!
  52.  
  53. 'The next statement needs to be after messages
  54. DATA 9999
  55.  
  56.